The exponential developments in computer hardware over the past several decades have spawned increasing complexity in computer programs. Computer hardware, specifically computer chips, have held strong to Moore's Law, doubling in computing power every eighteen months. We have gone from room size computers, to small 8-bit computer chips with only a few thousand transistors to the technology of today that includes 64-bit chips packed with almost 50 million transistors. We have moved from a time when 8 bits was quite a large amount of memory to a time where 256 megabytes of memory and 50 gigabyte storage mediums are common. As the trend continues we will see a continued devotion to the exponential growth of computer hardware including computer chips which will have billions of nanometer sized transistors and storage mediums capable of holding terabytes of information. This means that computer programs will continue to grow even larger and more complex, than the programs of today, in order to meet and exceed the functional desires and expectations of businesses and consumers. However, increasing programmatic size and complexity has a cost and that cost is measured in terms of reliability.
Due to the increasingly complex nature of software systems programmers have been riddled by undetectable programmatic errors that sometimes do not manifest themselves until it is too late. Developers continue to try and expand the power of programming languages by incorporating increasingly complex mathematical and philosophical concepts. Additionally, the software market is becoming increasingly platform independent and service oriented. Combining powerful object-oriented programmatic concepts into a new data centric and service based world causes programmers problems as they try and piece together the best parts of a multitude of different technologies in an ad hoc fashion.
Type systems are a formal mechanism for ensuring that typed programs perform correctly and in a well-behaved manner. Typed programs or typed systems are generally programs or systems that assign types to variables (e.g., Boolean, integer, real, etc.) or objects. Types are classifications of data that describe how a programmer wants to use the data and how a compiler should interpret such data. However, many functions are only defined to work on particular types (e.g. integer addition or floating point addition). If a given function is defined to work with a certain data type and it receives a different type of data, a type error will be produced. A type system can prevent certain execution errors by utilizing a type-checking algorithm to determine whether a program is well behaved or ill behaved. This process is referred to as type checking. Type checking allows for early detection and therefore correction of errors that may often go undetected by programmers. If such errors are left uncorrected they may lurk in the code, only to become manifestly obvious at a most inopportune time.
In general there are two varieties of type systems—nominal and structural. A nominal type system is a system in which type names are used to determine whether types are equivalent. In a structural type system, names are not essential, because types are said to be equivalent if they have the same structure, as the name suggests. For example, assume Type A=string of integers (1 . . . 10) and Type B=string of integers (1 . . . 10). Further assume that a is of Type A, b is of Type B, and the expression a=b is written into the same program. Under a nominal type system this expression would produce an error because a and b are of different types. However, under a structural type system such an assignment would be legal because the types are equivalent.
Presently there is a significant problem for developers who wish to employ a structural type language. As mentioned supra, in the current day and age, the software industry is moving toward becoming a web service oriented industry. Thus, uniformity in data formats (e.g., extensible markup language (XML)) and platform independent programs are becoming vitally important. However, the underlying architectures that provide for platform independent program execution (e.g., Java Virtual Machine (JVM) and Common Language Runtime (CLR)) have nominal type systems. Therefore, a problem exists concerning how to implement a structural typing, on top of a nominal type system.